import request from '@/utils/request'
export default{
    //根据课程id查询章节信息
    getCourseInfo(courseId) {
       return request({
         url: `/eduservice/edu-chapter/${courseId}`,
         method: 'get'
       })
    },
      //根据章节id查询章节
      getChapter(chapterId) {
        return request({
          url: `/eduservice/edu-chapter/chapter/${chapterId}`,
          method: 'get'
        })
     },
    //添加或者修改章节
    saveOrUpdate(eduChapter) {
      return request({
        url: `/eduservice/edu-chapter/chapter/save`,
        method: 'post',
        data: eduChapter
      })
   },
   //删除章节-判断有小结就不删除
   deleteById(chapterId) {
    return request({
      url: `/eduservice/edu-chapter/chapter/${chapterId}`,
      method: 'delete'
    })
 }

}
